#ifndef CONCRETE_COLLEAGUE_H
#define CONCRETE_COLLEAGUE_H

#include"colleague.h"
#include<iostream>
class ColleagueA:public IColleague{
public:
    ColleagueA(const std::string & name):IColleague(name){}
    // 通过中介者，将自己的消息发布出去
     void sendMessage(const IMediator& mediator, const std::string& message) const override {
        mediator.distributeMessage(this, message);
    }
private:
    // 接收来自发送者的消息
     void receiveMessage(const IColleague* sender, const std::string& message) const override {
        std::cout << this->getName() << " received the message from "
                  << sender->getName() << ": " << message << std::endl;
    }




};
#endif // CONCRETE_COLLEAGUE_H
